package com.lincoln.entity;

import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import java.util.Date;

/**
 * 基本实体类
 * @author lincoln
 */
@Data
@MappedSuperclass
@NoArgsConstructor
public class BaseEntity extends BaseIdEntity {
    @CreationTimestamp
    @Column(name = "create_time")
    protected Date createTime;
    @UpdateTimestamp
    @Column(name = "update_time")
    protected Date updateTime;
}
